try:
    gender=input('input gender:')
    if gender != 'm' and gender !='f':
        raise Exception('unknown gender')
    else:
        print(gender)
except Exception as e:
    print(e)